home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / mach / ds3100.md / stat.h < prev    next >
C/C++ Source or Header  |  1989-07-20  |  2KB  |  73 lines

  1. /*
  2.  * Copyright (c) 1982, 1986 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  *
  6.  *    @(#)stat.h    7.1 (Berkeley) 6/4/86
  7.  */
  8.  
  9. #ifndef _STAT
  10. #define _STAT
  11.  
  12. struct    stat
  13. {
  14.     dev_t    st_dev;
  15.     ino_t    st_ino;
  16.     unsigned short st_mode;
  17.     short    st_nlink;
  18.     uid_t    st_uid;
  19.     gid_t    st_gid;
  20.     dev_t    st_rdev;
  21.     off_t    st_size;
  22.     time_t    st_atime;
  23.     int    st_spare1;
  24.     time_t    st_mtime;
  25.     int    st_spare2;
  26.     time_t    st_ctime;
  27.     int    st_spare3;
  28.     long    st_blksize;
  29.     long    st_blocks;
  30.     long    st_serverID;
  31.     long    st_version;
  32. };
  33.  
  34. #define    S_IFMT    0170000        /* type of file */
  35. #define        S_IFDIR    0040000    /* directory */
  36. #define        S_IFCHR    0020000    /* character special */
  37. #define        S_IFBLK    0060000    /* block special */
  38. #define        S_IFREG    0100000    /* regular */
  39. #define        S_IFLNK    0120000    /* symbolic link */
  40. #define        S_IFSOCK 0140000/* socket */
  41. #define        S_IFIFO    0010000    /* fifo */
  42. /* Extra Sprite types */
  43. #define        S_IFPDEV 0150000 /* pseudo-device */
  44. #define        S_IFRLNK 0160000 /* remote link */
  45. #define    S_ISUID    0004000        /* set user id on execution */
  46. #define    S_ISGID    0002000        /* set group id on execution */
  47. #define    S_ISVTX    0001000        /* save swapped text even after use */
  48. #define    S_IREAD    0000400        /* read permission, owner */
  49. #define    S_IWRITE 0000200    /* write permission, owner */
  50. #define    S_IEXEC    0000100        /* execute/search permission, owner */
  51. /*
  52.  * User-defined file types.  A number of types are standardized, but others
  53.  * may be defined by the user.
  54.  *
  55.  *     S_TYPE_UNDEFINED    - no type set
  56.  *     S_TYPE_TMP          - temporary file
  57.  *     S_TYPE_SWAP         - swap file
  58.  *     S_TYPE_OBJECT       - ".o" file
  59.  *     S_TYPE_BINARY       - executable
  60.  *     S_TYPE_OTHER       - file that doesn't correspond to any
  61.  *                  specific type.  This is distinct
  62.  *                  from undefined, which says the type
  63.  *                  is uninitialized and may be inferred
  64.  *                  by parent directory or file name.
  65.  */
  66. #define S_TYPE_UNDEFINED 0
  67. #define S_TYPE_TMP 1
  68. #define S_TYPE_SWAP 2
  69. #define S_TYPE_OBJECT 3
  70. #define S_TYPE_BINARY 4
  71. #define S_TYPE_OTHER 5
  72. #endif /* _STAT */
  73.